//
//  AccountDetailedCell.swift
//  mggz
//
//  Created by QinWei on 2018/3/14.
//  Copyright © 2018年 爱丽丝的梦境. All rights reserved.
//

import UIKit

class AccountDetailedCell: UITableViewCell {

    @IBOutlet weak var projectName: UILabel!
    
    @IBOutlet weak var alreadyMoney: UILabel!
    

    @IBOutlet weak var waitMoney: UILabel!
    
    @IBOutlet weak var detailedButton: UIButton!
    
    @IBOutlet weak var leftView: UIView!
    
    @IBOutlet weak var rightView: UIView!
    
    @IBOutlet weak var middleView: UIView!
    
    
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
    }
    override func layoutSubviews() {
        
        self.middleView.layer.cornerRadius = 5
        self.middleView.layer.masksToBounds = true
        self.contentView.backgroundColor = UIColor.init(red: 233/255.0, green: 233/255.0, blue: 233/255.0, alpha: 1)
        self.leftView.backgroundColor = UIColor.init(red: 233/255.0, green: 233/255.0, blue: 233/255.0, alpha: 1)
        self.rightView.backgroundColor = UIColor.init(red: 233/255.0, green: 233/255.0, blue: 233/255.0, alpha: 1)
        
    }
    
    func setupCellData(_ model:SalaryAllDetailModel){
        if let readyMoney = model.SalaryPayed{
            let readMoneyNum = NSNumber.init(value: readyMoney)
            let valueString1 = Tool.numberToMoney("\(readMoneyNum)")
            self.alreadyMoney.text = valueString1! + "元"
        }
        
        if let lastMoney = model.SalaryNotPayed{
            let lastMoneyNum = NSNumber.init(value: lastMoney)
            let valueString2 = Tool.numberToMoney("\(lastMoneyNum)")
            self.waitMoney.text = valueString2! + "元"
        }
        self.projectName.text = model.CompanyName ?? "暂无"
    }
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

    }
    
}
